package day06;

import java.io.File;
import java.io.IOException;

public class Demo05 {

	public static void main(String[] args) throws Exception {
		
		File dir=new File("demo");
		File file=new File(dir,"hello.txt");
		
//		File f=new File(new File("demo"),"hello.txt");
		
		boolean b=file.exists();
		System.out.println(b);
		
//		b=f.exists();
//		System.out.println(b);
		
		File ff=file.getParentFile();
		System.out.println(ff);
		
		String str=file.getName();
		System.out.println(str);
		
		String s2=file.getAbsolutePath();
		System.out.println(s2);
		
		String s3=file.getPath();
		System.out.println(s3);
		
		String s4=file.getCanonicalPath();
		System.out.println(s4);
		
		
		long  a=file.length();
		
		System.out.println(a);
		
	}

}
